package cn.enited.devtools.apiaggregator.anno;

import cn.enited.devtools.apiaggregator.consts.ApiConst;
import cn.enited.devtools.apiaggregator.consts.CommonConst;

import java.lang.annotation.*;
import java.util.concurrent.TimeUnit;

@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface Lock {

    String name() default ApiConst.CACHE_LOCK.KEY + "_lock";

    long lease() default ApiConst.CACHE_LOCK.EXPIRED;

    TimeUnit unit() default TimeUnit.MILLISECONDS;
}
